package com.ic.es.controller;


import com.ic.es.service.EsVideoArchiveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/video")
public class EsVideoArchiveController {
    private final EsVideoArchiveService videoArchiveService;

    @Autowired
    public EsVideoArchiveController(EsVideoArchiveService videoArchiveService) {
        this.videoArchiveService = videoArchiveService;
    }

    @PostMapping("/archive")
    public void indexVideoArchive(@RequestBody EsVideoArchiveService archive) {
        videoArchiveService.indexVideoArchive(archive);
    }
}
